import { type } from "os"

function fn(n1: number, n2:number) {
    return [n1,n2]
}
  
// 获取fn函数的类型。这里鼠标悬浮提示就能看到
// type Fn = typeof fn

// const obj = {a:1, b:2}

// type T = typeof obj

// type T = ReturnType<Fn>

// 任意给一个函数，如何获取函数的返回值的类型？
// type R = ReturnType<typeof 函数>

// type R = ReturnType<typeof fn>
// type R = ReturnType<typeof Array.prototype.push>
type R = ReturnType<typeof Array.prototype.sort>
